import * as type from './mutation-types'
import { log } from 'core-js';
const mutations = {
  [type.EXAM](state, data) { // eslint-disable-line
    state.exam = data
  },
  [type.EXAMP](state, data) { // eslint-disable-line
    state.examp = data
  },
  [type.TOPIC](state, data) { // eslint-disable-line
    state.topic = data
  },
  [type.TOPICW](state, data) { // eslint-disable-line
    state.topicw = data
  },
  [type.TOPICL](state, data) { // eslint-disable-line
    state.topicl = data
  },
  [type.TOPICP](state, data) { // eslint-disable-line
    state.topicp = data
  },
  [type.ORDERNUM](state, data) { // eslint-disable-line
    state.orderNum = data
  },
  [type.ORDERNUMP](state, data) { // eslint-disable-line
    state.orderNump = data
  },
  [type.CURRENTORDER](state, data) { // eslint-disable-line
    state.currentOrder = data
  },
  [type.CURRENTORDERP](state, data) { // eslint-disable-line
    state.currentOrderp = data
  },
  [type.ADD](state, data) { // eslint-disable-line
    state.add = data
  },
  [type.CARDLIST](state, data) { // eslint-disable-line
    state.cardList = data
    // console.log("state",state)
    // console.log("data",data)
  },
  [type.CURRENTVALUE](state, data) { // eslint-disable-line
    state.currentV = data
    console.log('单选值', data)
  },
  [type.CURRENTBOX](state, data) { // eslint-disable-line
    // sel: "B,C"
    let dataArr=data.split(',')
    state.currentB.push(dataArr)
    console.log('多选值', dataArr)
  },
  [type.CURRENTVALUEP](state, data) { // eslint-disable-line
    state.currentVP = data
    console.log('单选值', data)
  },
  [type.CURRENTBOXP](state, data) { // eslint-disable-line
    // sel: "B,C"
    let dataArr=data.split(',')
    state.currentBP = dataArr
    console.log('多选值', dataArr)
  },
}

export default mutations
